= form_for @template_category do |f|
  - if @template_category.errors.any?
    #error_explanation
      %h2= "#{pluralize(@template_category.errors.count, "error")} prohibited this template_category from being saved:"
      %ul
        - @template_category.errors.full_messages.each do |msg|
          %li= msg

  .field
    = f.label :name
    = f.text_field :name
  .field
    = f.label :icon
    = image_tag @template_category.icon.url(:small)
    = f.file_field :icon
  .actions
    = f.submit 'Save', class: 'btn btn-primary'
